<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib uri="TowkerTagLib" prefix="rbac"%>
<%@include file="/commons/include/html_doctype.html" %>
<html>
<head>
	<title>物料信息列表</title>
	<%@include file="/commons/include/get.jsp" %>
	<script type="text/javascript">
		//放置脚本
		function openCopyOrder(id){
			var source = encodeURIComponent(ctx+"/manage/basicData/getSurplusOrderByGoodsId.htm?goods_id="+id+"&classId=&r=" + Math.random());
			var url = ctx + "/commons/showDialog.jsp?r=" + Math.random() + "&url=" + source;
			var r = window.showModalDialog(url, this, "dialogWidth=380px;dialogHeight=350px;scroll=no");
			if(r)
				location.reload();
		}
	</script>
</head> 
<body>
<table border="0" cellspacing="0" cellpadding="0" class="listLogo">
	<tr>
		<td class="title">物料信息列表</td>
		<td>
			<div class="menuTool">
			<a class="del" id="listFormDelAll" href="delGoods.htm">删除所选</a>
			<a class="upd" id="listFormBatchAll" href="batchUpdJprice1.htm">批量修改单价</a>
			<a class="add" href="addGoods1.htm">添加</a>
			<a class="back" onClick="javascript:history.back();" href="#">返回</a>
			</div>
		</td>
	</tr>
</table>
<div class="line"></div>
<form id="queryForm" method="post" action="getGoods.htm">
<table border="0" cellspacing="0" cellpadding="0" class="queryTable">
	<tr>
		<td class="title">品种代码：</td>
		<td class="input"><input id="title" name="goods_sn" class="input" value="${fn:escapeXml(param.goods_sn)}" /></td>
		
		<td class="title">品种名称：</td>
		<td class="input"><input id="title" name="goods_name" class="input" value="${fn:escapeXml(param.goods_name)}" /></td>
		
		<td class="query" colspan="2"><input id="_querySubmit_" type="submit" class="button" value="查询" /></td>
	</tr>
</table>
</form>
<div class="line"></div>
<form id="listForm" method="post" action="delGoods.htm">
<table border="0" cellspacing="1" cellpadding="0" class="listTable">
	<tr class="list_title">
		<td style="width:3%"><input id="chkall" type="checkbox" /></td>
		<td>品种代码</td>
		<td>品种名称</td>
		<td>产品单位</td>
		<td>产品重量</td>
		<td>当前库存量</td>
		<td>操作</td>
	</tr>
<c:forEach items="${pageModel.result}" var="d" varStatus="status">
	<tr class="${status.index%2==0?'list_even':'list_odd'}">
		<td nowrap="nowrap">
			<input name="keyIndex" type="checkbox" value="${d.id}" />
		</td>
		<td>${fn:escapeXml(d.goods_sn)}</td>
		<td>${fn:escapeXml(d.goods_name)}</td>
		<td>${fn:escapeXml(d.unit)}</td>
		<td>${fn:escapeXml(d.weight)}</td>
		<td><a id="getSurplusOrderByGoodsId" onclick="openCopyOrder(${d.id})" href="#">${fn:escapeXml(d.stock)}</a></td>
		<td>
			<div class="menuTool">
			<a class="del" href="delGoods.htm?keyIndex=${d.id}">删除</a>
			<a class="upd" href="updGoods1.htm?keyIndex=${d.id}">修改</a>
			<a class="get" href="getGoodsById.htm?keyIndex=${d.id}">详细</a>
			</div>
		</td>
	</tr>
</c:forEach>
</table>
<input id="_submit_" type="submit" style="display:none;" />
</form>
<table border="0" cellspacing="0" cellpadding="0" class="bottomTable">
	<tr><td>${pageNav.page}</td></tr>
</table>
</body>
</html>
